const router =  require('koa-router')();
const admin = require('./admin/admin');
const user = require('./user/user');
const project = require('./project/project');
const landAgent = require('./landagent/landAgent');
const manager = require('./manager/manager');
const product = require('./product/product');
const scenario =require('./scenario/scenario');
const model = require('./model/model');
const iconLib = require('./iconLib/iconLib');
const vendor = require('./product/vendor');
const modelType = require('./product/modelType');
const house = require('./house/house');
const mail = require('./mail/mail');
const upload = require('./upload/upload');
const excel = require('./excel-export/excel-export');
const argracefile = require('./argracefile/argracefile');

router.use('/backapi/admin', admin.routes(), admin.allowedMethods());
router.use('/mail', mail.routes(), mail.allowedMethods());
router.use('/user', user.routes(), user.allowedMethods());
router.use('/projects', project.routes(), project.allowedMethods());

router.use('/upload', upload.routes(), upload.allowedMethods());
router.use('/files', argracefile.routes(), argracefile.allowedMethods());
// router.use('/project/building', building.routes(), building.allowedMethods());

// router.use('/houseType', houseType.routes(), houseType.allowedMethods());
// router.use('/roomDeviceTemp', roomDeviceTemp.routes(), roomDeviceTemp.allowedMethods());

router.use('/landAgents', landAgent.routes(), landAgent.allowedMethods());
router.use('/managers', manager.routes(), manager.allowedMethods());
// router.use('/room', room.routes(), room.allowedMethods());
router.use('/model', model.routes(), model.allowedMethods());

router.use('/scenarios', scenario.routes(), scenario.allowedMethods());

router.use('/projects/buildings/houses', house.routes(), house.allowedMethods());

router.use('/vendors', vendor.routes(), vendor.allowedMethods());
router.use('/modeltypes', modelType.routes(), modelType.allowedMethods());
router.use('/icons', iconLib.routes(), iconLib.allowedMethods());

router.use('/products', product.routes(), product.allowedMethods());
router.use('/excel', excel.routes(), excel.allowedMethods());


module.exports = router;